package org.szy.monitor.entity;

import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import com.mybatisflex.core.keygen.KeyGenerators;
import org.szy.core.common.listener.BaseInsertListener;
import org.szy.core.common.listener.BaseUpdateListener;

import java.time.LocalDateTime;

/**
 * 在线用户记录实体
 *
 * @author wangbuhao
 * @since 2023-06-30 17:41:26
 **/
@Table(value = "user_online")
public class UserOnline {

    @Id(keyType = KeyType.Generator, value = KeyGenerators.flexId)
    private Long id;
    /**
     * 用户ID
     */
    private Long userId;
    /** 用户登录 token */
    private String token;
    /**
     * 表名称
     */
    private String table;
    /**
     * 表说明
     */
    private String tableRemark;
    /**
     * 用户昵称
     */
    private String nickname;
    /**
     * 登录设备
     */
    private String device;
    /**
     * 登录IP地址
     */
    private String ip;
    /**
     * 登录地点
     */
    private String location;
    /**
     * 浏览器类型
     */
    private String browser;
    /**
     * 操作系统
     */
    private String os;
    /**
     * 1：在线，0：离线
     */
    private Integer status;
    /**
     * session创建时间
     */
    private LocalDateTime startDatetime;
    /**
     * session最后访问时间
     */
    private LocalDateTime activityDatetime;
    /**
     * 超时时间(秒)
     */
    private Long expireSecond;

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public String getTable() {
        return table;
    }

    public void setTable(String table) {
        this.table = table;
    }

    public String getTableRemark() {
        return tableRemark;
    }

    public void setTableRemark(String tableRemark) {
        this.tableRemark = tableRemark;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getDevice() {
        return device;
    }

    public void setDevice(String device) {
        this.device = device;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public String getBrowser() {
        return browser;
    }

    public void setBrowser(String browser) {
        this.browser = browser;
    }

    public String getOs() {
        return os;
    }

    public void setOs(String os) {
        this.os = os;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public LocalDateTime getStartDatetime() {
        return startDatetime;
    }

    public void setStartDatetime(LocalDateTime startDatetime) {
        this.startDatetime = startDatetime;
    }

    public LocalDateTime getActivityDatetime() {
        return activityDatetime;
    }

    public void setActivityDatetime(LocalDateTime activityDatetime) {
        this.activityDatetime = activityDatetime;
    }

    public Long getExpireSecond() {
        return expireSecond;
    }

    public void setExpireSecond(Long expireSecond) {
        this.expireSecond = expireSecond;
    }

}
